#define _CRT_SECURE_NO_WARNINGS  1
#include<stdio.h>
int missNumber(int* nums, int numsSize)
{
	int x = 0;
	for (int i = 0; i < numsSize; i++)
	{
		x ^= nums[i];
		printf("%d\n", x);
	}
	printf("************\n");
	for (int j = 0; j < numsSize + 1; j++)
	{
		x ^= j;
		printf("%d\n", x);
	}
	return x;
}
int main()
{
	int nums[10] = { 0,5,6,7,9,2,1,4,8 };
	int numsSize = (sizeof(nums) / sizeof(nums[0]))-1;
	int a =missNumber( nums,numsSize);
	printf("%d\n", a);
	return 0;
}